import request from '@/request'

export function findAll(data) {
    return request.post("emp/findByPage",data);
}

export function dofindAll() {
    return request.post("emp/findAll");
}
export function findOne(empId) {
    return request.post("emp/findOne",empId,request.textConfig);
}

export function doSaveOrUpdate(data) {
    let path = data.userId ? "update" : "save";
    return request.post(`emp/${path}`, data);
}

export function deleteByEmpId(empId) {
    return request.post("emp/delete",empId,request.textConfig);
}

export function distRoleToEmp(empId,roleIds) {
    return request.post("emp/distRoleToEmp",{empId,roleIds});
}


